home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10520 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news.ner.bbnplanet.net!forest!groy
  2. From: groy@forest.drew.edu (I can't think of a nickname)
  3. Newsgroups: comp.lang.c
  4. Subject: HELP with code!!! 
  5. Message-ID: <1996Mar18.005012.137922@forest>
  6. Date: 18 Mar 96 00:50:12 EST
  7. Organization: Drew University
  8.  
  9. Hello again,
  10.  
  11.  
  12. I am having serious problems with a program I am trying to write for my 
  13. C-programming class.... (it won't compile) and for some reason I can't 
  14. find the problem.. i have isolated the problem to a section of code but I 
  15. can't find the error ... (It is ok for me to ask for outside help.. the 
  16. teacher expects us to ask) So I am posting the function that contains the 
  17. problem.. all sugestions are welcome becasue I will be up all night over 
  18. this one... for simplicity sake assume that all variables are called 
  19. correctly in the main and all of the calls for this function are written 
  20. correctly...
  21. here it is... please answer as soon as posssible... thanks again
  22. Greg Roy
  23. groy@drew.edu
  24.  
  25. void list_delete(LIST list, ACT_FPRT actfptr, CMP_FPTR cmpfptr) {
  26.         LISTNODE *start, *end, *runner;
  27.  
  28.         end = start = list;
  29.         while(end) {
  30.           end = start->nextptr;
  31.           while(end && (0==cmpfptr(start->dataptr, end->dataptr)))
  32.                         end = end->nextptr;
  33.           runner = start->nextptr;
  34.           while(runner != end) {
  35.                 start->nextptr = runner->nextptr;
  36.                 actfptr(runner->dataptr);
  37.                 ln_destroy(runner);
  38.                 runner = start->nextptr;
  39.                 } /* while(runner != end) end*/
  40.           start = end;
  41.         } /* while(end) end */
  42. } /* list_delete end */
  43.  
  44.